from pathlib import Path
import os
#取绝对目录
save_dir = Path(__file__).parent.absolute()
print(save_dir)
#取日期时间
import time
start_time = time.time()
struct_time = time.gmtime(start_time)
print(start_time,struct_time)
#按年月日时分秒保存文件-设定保存绝对目录
checkpoint_dir = 'checkpoints_{}_{}_{}_{}_{}_{}'.format(
    struct_time.tm_year,
    struct_time.tm_mon,
    struct_time.tm_mday,
    struct_time.tm_hour,
    struct_time.tm_min,
    struct_time.tm_sec)
CHECKPOINT_PATH = os.path.join(save_dir, 'Checkpoints', checkpoint_dir)